package com.kun.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * @className: PassengerQueryResp
 * @Description: 查询乘客的返回参数类
 * @author: kunkun
 * @date: 2025/7/27 11:49
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class PassengerQueryResp {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @NotNull(message = "会员id不能为空")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long memberId;

    @NotBlank(message = "乘客人姓名不能为空")
    private String name;

    @NotBlank(message = "乘客人身份证号不能为空")
    private String idCard;

    @NotBlank(message = "乘客人身份类型不能为空")
    private String type;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
}
